home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / bionicc.c < prev    next >
C/C++ Source or Header  |  2000-05-04  |  19KB  |  522 lines

  1. /********************************************************************
  2.  
  3.               Bionic Commando
  4.  
  5.  
  6.  
  7. ToDo:
  8. - finish video driver
  9.     Some attributes are unknown. I don't remember the original game but
  10.     seems there are some problems:
  11.     - misplaced sprites ? ( see beginning of level 1 or 2 for example )
  12.     - sprite / sprite priority ? ( see level 2 the reflectors )
  13.     - sprite / background priority ? ( see level 1: birds walk through
  14.         branches of different trees )
  15.     - see the beginning of level 3: is the background screwed ?
  16.  
  17. - get rid of input port hack
  18.  
  19.     Controls appear to be mapped at 0xFE4000, alongside dip switches, but there
  20.     is something strange going on that I can't (yet) figure out.
  21.     Player controls and coin inputs are supposed to magically appear at
  22.     0xFFFFFB (coin/start)
  23.     0xFFFFFD (player 2)
  24.     0xFFFFFF (player 1)
  25.     This is probably done by an MPU on the board (whose ROM is not
  26.     available).
  27.  
  28.     The MPU also takes care of the commands for the sound CPU, which are stored
  29.     at FFFFF9.
  30.  
  31.     IRQ4 seems to be control related.
  32.     On each interrupt, it reads 0xFE4000 (coin/start), shift the bits around
  33.     and move the resulting byte into a dword RAM location. The dword RAM location
  34.     is rotated by 8 bits each time this happens.
  35.     This is probably done to be pedantic about coin insertions (might be protection
  36.     related). In fact, currently coin insertions are not consistently recognized.
  37.  
  38. ********************************************************************/
  39.  
  40.  
  41. #include "driver.h"
  42.  
  43. static unsigned char *ram_bc; /* used by high scores */
  44.  
  45. WRITE_HANDLER( bionicc_fgvideoram_w );
  46. WRITE_HANDLER( bionicc_bgvideoram_w );
  47. WRITE_HANDLER( bionicc_txvideoram_w );
  48. READ_HANDLER( bionicc_fgvideoram_r );
  49. READ_HANDLER( bionicc_bgvideoram_r );
  50. READ_HANDLER( bionicc_txvideoram_r );
  51. WRITE_HANDLER( bionicc_paletteram_w );
  52. WRITE_HANDLER( bionicc_scroll_w );
  53. WRITE_HANDLER( bionicc_gfxctrl_w );
  54.  
  55. extern unsigned char *bionicc_bgvideoram;
  56. extern unsigned char *bionicc_fgvideoram;
  57. extern unsigned char *bionicc_txvideoram;
  58. extern unsigned char *spriteram;
  59. extern size_t spriteram_size;
  60.  
  61. int bionicc_vh_start(void);
  62. void bionicc_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  63. void bionicc_eof_callback(void);
  64.  
  65. void bionicc_readinputs(void);
  66. void bionicc_sound_cmd(int data);
  67.  
  68.  
  69.  
  70. READ_HANDLER( bionicc_inputs_r )
  71. {
  72. logerror("%06x: inputs_r %04x\n",cpu_get_pc(),offset);
  73.     return (readinputport(offset)<<8) + readinputport(offset+1);
  74. }
  75.  
  76. static unsigned char bionicc_inp[6];
  77.  
  78. WRITE_HANDLER( hacked_controls_w )
  79. {
  80. logerror("%06x: hacked_controls_w %04x %02x\n",cpu_get_pc(),offset,data);
  81.     COMBINE_WORD_MEM( &bionicc_inp[offset], data);
  82. }
  83.  
  84. static READ_HANDLER( hacked_controls_r )
  85. {
  86. logerror("%06x: hacked_controls_r %04x %04x\n",cpu_get_pc(),offset,READ_WORD( &bionicc_inp[offset] ));
  87.     return READ_WORD( &bionicc_inp[offset] );
  88. }
  89.  
  90. static WRITE_HANDLER( bionicc_mpu_trigger_w )
  91. {
  92.     data = readinputport(0) >> 4;
  93.     WRITE_WORD(&bionicc_inp[0x00],data ^ 0x0f);
  94.  
  95.     data = readinputport(5); /* player 2 controls */
  96.     WRITE_WORD(&bionicc_inp[0x02],data ^ 0xff);
  97.  
  98.     data = readinputport(4); /* player 1 controls */
  99.     WRITE_WORD(&bionicc_inp[0x04],data ^ 0xff);
  100. }
  101.  
  102.  
  103.  
  104. static unsigned char soundcommand[2];
  105.  
  106. WRITE_HANDLER( hacked_soundcommand_w )
  107. {
  108.     COMBINE_WORD_MEM( &soundcommand[offset], data);
  109.     soundlatch_w(0,data & 0xff);
  110. }
  111.  
  112. static READ_HANDLER( hacked_soundcommand_r )
  113. {
  114.     return READ_WORD( &soundcommand[offset] );
  115. }
  116.  
  117.  
  118. /********************************************************************
  119.  
  120.   INTERRUPT
  121.  
  122.   The game runs on 2 interrupts.
  123.  
  124.   IRQ 2 drives the game
  125.   IRQ 4 processes the input ports
  126.  
  127.   The game is very picky about timing. The following is the only
  128.   way I have found it to work.
  129.  
  130. ********************************************************************/
  131.  
  132. int bionicc_interrupt(void)
  133. {
  134.     if (cpu_getiloops() == 0) return 2;
  135.     else return 4;
  136. }
  137. static struct MemoryReadAddress readmem[] =
  138. {
  139.     { 0x000000, 0x03ffff, MRA_ROM },                /* 68000 ROM */
  140.     { 0xfe0000, 0xfe07ff, MRA_BANK1 },              /* RAM? */
  141.     { 0xfe0800, 0xfe0cff, MRA_BANK2 },              /* sprites */
  142.     { 0xfe0d00, 0xfe3fff, MRA_BANK3 },              /* RAM? */
  143.     { 0xfe4000, 0xfe4003, bionicc_inputs_r },       /* dipswitches */
  144.     { 0xfec000, 0xfecfff, bionicc_txvideoram_r },
  145.     { 0xff0000, 0xff3fff, bionicc_fgvideoram_r },
  146.     { 0xff4000, 0xff7fff, bionicc_bgvideoram_r },
  147.     { 0xff8000, 0xff87ff, paletteram_word_r },
  148.     { 0xffc000, 0xfffff7, MRA_BANK8 },               /* working RAM */
  149.     { 0xfffff8, 0xfffff9, hacked_soundcommand_r },      /* hack */
  150.     { 0xfffffa, 0xffffff, hacked_controls_r },      /* hack */
  151.     { -1 }
  152. };
  153.  
  154. static struct MemoryWriteAddress writemem[] =
  155. {
  156.     { 0x000000, 0x03ffff, MWA_ROM },
  157.     { 0xfe0000, 0xfe07ff, MWA_BANK1 },    /* RAM? */
  158.     { 0xfe0800, 0xfe0cff, MWA_BANK2, &spriteram, &spriteram_size },
  159.     { 0xfe0d00, 0xfe3fff, MWA_BANK3 },              /* RAM? */
  160.     { 0xfe4000, 0xfe4001, bionicc_gfxctrl_w },    /* + coin counters */
  161.     { 0xfe8010, 0xfe8017, bionicc_scroll_w },
  162.     { 0xfe801a, 0xfe801b, bionicc_mpu_trigger_w },    /* ??? not sure, but looks like it */
  163.     { 0xfec000, 0xfecfff, bionicc_txvideoram_w, &bionicc_txvideoram },
  164.     { 0xff0000, 0xff3fff, bionicc_fgvideoram_w, &bionicc_fgvideoram },
  165.     { 0xff4000, 0xff7fff, bionicc_bgvideoram_w, &bionicc_bgvideoram },
  166.     { 0xff8000, 0xff87ff, bionicc_paletteram_w, &paletteram },
  167.     { 0xffc000, 0xfffff7, MWA_BANK8, &ram_bc },    /* working RAM */
  168.     { 0xfffff8, 0xfffff9, hacked_soundcommand_w },      /* hack */
  169.     { 0xfffffa, 0xffffff, hacked_controls_w },    /* hack */
  170.     { -1 }
  171. };
  172.  
  173.  
  174. static struct MemoryReadAddress sound_readmem[] =
  175. {
  176.     { 0x0000, 0x7fff, MRA_ROM },
  177.     { 0x8001, 0x8001, YM2151_status_port_0_r },
  178.     { 0xa000, 0xa000, soundlatch_r },
  179.     { 0xc000, 0xc7ff, MRA_RAM },
  180.     { -1 }  /* end of table */
  181. };
  182.  
  183. static struct MemoryWriteAddress sound_writemem[] =
  184. {
  185.     { 0x0000, 0x7fff, MWA_ROM },
  186.     { 0x8000, 0x8000, YM2151_register_port_0_w },
  187.     { 0x8001, 0x8001, YM2151_data_port_0_w },
  188.     { 0xc000, 0xc7ff, MWA_RAM },
  189.     { -1 }  /* end of table */
  190. };
  191.  
  192.  
  193.  
  194. INPUT_PORTS_START( bionicc )
  195.     PORT_START
  196.     PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
  197.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  198.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
  199.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
  200.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
  201.  
  202.     PORT_START
  203.     PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
  204.  
  205.     PORT_START      /* DSW2 */
  206.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  207.     PORT_DIPSETTING(    0x03, "3" )
  208.     PORT_DIPSETTING(    0x02, "4" )
  209.     PORT_DIPSETTING(    0x01, "5" )
  210.     PORT_DIPSETTING(    0x00, "7" )
  211.     PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
  212.     PORT_DIPSETTING(    0x04, DEF_STR( Upright ) )
  213.     PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
  214.     PORT_DIPNAME( 0x18, 0x18, DEF_STR( Bonus_Life ) )
  215.     PORT_DIPSETTING(    0x18, "20K, 40K, every 60K")
  216.     PORT_DIPSETTING(    0x10, "30K, 50K, every 70K" )
  217.     PORT_DIPSETTING(    0x08, "20K and 60K only")
  218.     PORT_DIPSETTING(    0x00, "30K and 70K only" )
  219.     PORT_DIPNAME( 0x60, 0x40, DEF_STR( Difficulty ) )
  220.     PORT_DIPSETTING(    0x40, "Easy" )
  221.     PORT_DIPSETTING(    0x60, "Medium")
  222.     PORT_DIPSETTING(    0x20, "Hard")
  223.     PORT_DIPSETTING(    0x00, "Hardest" )
  224.     PORT_DIPNAME( 0x80, 0x80, "Freeze" )
  225.     PORT_DIPSETTING(    0x80, DEF_STR( Off ))
  226.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  227.  
  228.     PORT_START      /* DSW1 */
  229.     PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) )
  230.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  231.     PORT_DIPSETTING(    0x01, DEF_STR( 3C_1C ) )
  232.     PORT_DIPSETTING(    0x02, DEF_STR( 2C_1C ) )
  233.     PORT_DIPSETTING(    0x07, DEF_STR( 1C_1C ) )
  234.     PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
  235.     PORT_DIPSETTING(    0x05, DEF_STR( 1C_3C ) )
  236.     PORT_DIPSETTING(    0x04, DEF_STR( 1C_4C ) )
  237.     PORT_DIPSETTING(    0x03, DEF_STR( 1C_6C ) )
  238.     PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) )
  239.     PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
  240.     PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
  241.     PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
  242.     PORT_DIPSETTING(    0x38, DEF_STR( 1C_1C ) )
  243.     PORT_DIPSETTING(    0x30, DEF_STR( 1C_2C ) )
  244.     PORT_DIPSETTING(    0x28, DEF_STR( 1C_3C ) )
  245.     PORT_DIPSETTING(    0x20, DEF_STR( 1C_4C ) )
  246.     PORT_DIPSETTING(    0x18, DEF_STR( 1C_6C ) )
  247.     PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
  248.     PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) )
  249.     PORT_DIPSETTING(    0x80, DEF_STR( Off ))
  250.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  251.  
  252.     PORT_START
  253.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
  254.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
  255.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY )
  256.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY )
  257.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY )
  258.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY )
  259.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  260.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  261.  
  262.     PORT_START
  263.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 | IPF_COCKTAIL )
  264.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  265.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_8WAY | IPF_COCKTAIL )
  266.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT | IPF_8WAY | IPF_COCKTAIL )
  267.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN | IPF_8WAY | IPF_COCKTAIL )
  268.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP | IPF_8WAY | IPF_COCKTAIL )
  269.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  270.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  271. INPUT_PORTS_END
  272.  
  273.  
  274.  
  275. /********************************************************************
  276.  
  277.   GRAPHICS
  278.  
  279. ********************************************************************/
  280.  
  281.  
  282. static struct GfxLayout spritelayout_bionicc=
  283. {
  284.     16,16,  /* 16*16 sprites */
  285.     2048,   /* 2048 sprites */
  286.     4,      /* 4 bits per pixel */
  287.     { 0x30000*8,0x20000*8,0x10000*8,0 },
  288.     {
  289.         0,1,2,3,4,5,6,7,
  290.         (16*8)+0,(16*8)+1,(16*8)+2,(16*8)+3,
  291.         (16*8)+4,(16*8)+5,(16*8)+6,(16*8)+7
  292.     },
  293.     {
  294.         0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
  295.         8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8,
  296.     },
  297.     256   /* every sprite takes 256 consecutive bytes */
  298. };
  299.  
  300. static struct GfxLayout vramlayout_bionicc=
  301. {
  302.     8,8,    /* 8*8 characters */
  303.     1024,   /* 1024 character */
  304.     2,      /* 2 bitplanes */
  305.     { 4,0 },
  306.     { 0,1,2,3,8,9,10,11 },
  307.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  308.     128   /* every character takes 128 consecutive bytes */
  309. };
  310.  
  311. static struct GfxLayout scroll2layout_bionicc=
  312. {
  313.     8,8,    /* 8*8 tiles */
  314.     2048,   /* 2048 tiles */
  315.     4,      /* 4 bits per pixel */
  316.     { (0x08000*8)+4,0x08000*8,4,0 },
  317.     { 0,1,2,3, 8,9,10,11 },
  318.     { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
  319.     128   /* every tile takes 128 consecutive bytes */
  320. };
  321.  
  322. static struct GfxLayout scroll1layout_bionicc=
  323. {
  324.     16,16,  /* 16*16 tiles */
  325.     2048,   /* 2048 tiles */
  326.     4,      /* 4 bits per pixel */
  327.     { (0x020000*8)+4,0x020000*8,4,0 },
  328.     {
  329.         0,1,2,3, 8,9,10,11,
  330.         (8*4*8)+0,(8*4*8)+1,(8*4*8)+2,(8*4*8)+3,
  331.         (8*4*8)+8,(8*4*8)+9,(8*4*8)+10,(8*4*8)+11
  332.     },
  333.     {
  334.         0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
  335.         8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16
  336.     },
  337.     512   /* each tile takes 512 consecutive bytes */
  338. };
  339.  
  340. static struct GfxDecodeInfo gfxdecodeinfo_bionicc[] =
  341. {
  342.     { REGION_GFX1, 0, &vramlayout_bionicc,    768, 64 },    /* colors 768-1023 */
  343.     { REGION_GFX2, 0, &scroll2layout_bionicc,   0,  4 },    /* colors   0-  63 */
  344.     { REGION_GFX3, 0, &scroll1layout_bionicc, 256,  4 },    /* colors 256- 319 */
  345.     { REGION_GFX4, 0, &spritelayout_bionicc,  512, 16 },    /* colors 512- 767 */
  346.     { -1 }
  347. };
  348.  
  349.  
  350. static struct YM2151interface ym2151_interface =
  351. {
  352.     1,                      /* 1 chip */
  353.     3579545,                /* 3.579545 MHz ? */
  354.     { YM3012_VOL(60,MIXER_PAN_LEFT,60,MIXER_PAN_RIGHT) },
  355.     { 0 }
  356. };
  357.  
  358.  
  359. static struct MachineDriver machine_driver_bionicc =
  360. {
  361.     /* basic machine hardware */
  362.     {
  363.         {
  364.             CPU_M68000,
  365.             10000000, /* ?? MHz ? */
  366.             readmem,writemem,0,0,
  367.             bionicc_interrupt,8
  368.         },
  369.         {
  370.             CPU_Z80 | CPU_AUDIO_CPU,
  371.             4000000,  /* 4 Mhz ??? TODO: find real FRQ */
  372.             sound_readmem,sound_writemem,0,0,
  373.             nmi_interrupt,4    /* ??? */
  374.         }
  375.     },
  376.     60, 5000, //DEFAULT_REAL_60HZ_VBLANK_DURATION,
  377.     1,
  378.     0,
  379.  
  380.     /* video hardware */
  381.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  382.     gfxdecodeinfo_bionicc,
  383.     1024, 1024,    /* but a lot are not used */
  384.     0,
  385.  
  386.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE | VIDEO_BUFFERS_SPRITERAM,
  387.     bionicc_eof_callback,
  388.     bionicc_vh_start,
  389.     0,
  390.     bionicc_vh_screenrefresh,
  391.  
  392.     0,0,0,0,
  393.     {
  394.         {
  395.             SOUND_YM2151,
  396.             &ym2151_interface
  397.         },
  398.     }
  399. };
  400.  
  401.  
  402.  
  403. ROM_START( bionicc )
  404.     ROM_REGION( 0x40000, REGION_CPU1 )      /* 68000 code */
  405.     ROM_LOAD_EVEN( "tsu_02b.rom",  0x00000, 0x10000, 0xcf965a0a ) /* 68000 code */
  406.     ROM_LOAD_ODD ( "tsu_04b.rom",  0x00000, 0x10000, 0xc9884bfb ) /* 68000 code */
  407.     ROM_LOAD_EVEN( "tsu_03b.rom",  0x20000, 0x10000, 0x4e157ae2 ) /* 68000 code */
  408.     ROM_LOAD_ODD ( "tsu_05b.rom",  0x20000, 0x10000, 0xe66ca0f9 ) /* 68000 code */
  409.  
  410.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  411.     ROM_LOAD( "tsu_01b.rom",  0x00000, 0x8000, 0xa9a6cafa )
  412.  
  413.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  414.     ROM_LOAD( "tsu_08.rom",   0x00000, 0x8000, 0x9bf0b7a2 )    /* VIDEORAM (text layer) tiles */
  415.  
  416.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  417.     ROM_LOAD( "tsu_07.rom",   0x00000, 0x8000, 0x9469efa4 )    /* SCROLL2 Layer Tiles */
  418.     ROM_LOAD( "tsu_06.rom",   0x08000, 0x8000, 0x40bf0eb4 )
  419.  
  420.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  421.     ROM_LOAD( "ts_12.rom",    0x00000, 0x8000, 0xe4b4619e )    /* SCROLL1 Layer Tiles */
  422.     ROM_LOAD( "ts_11.rom",    0x08000, 0x8000, 0xab30237a )
  423.     ROM_LOAD( "ts_17.rom",    0x10000, 0x8000, 0xdeb657e4 )
  424.     ROM_LOAD( "ts_16.rom",    0x18000, 0x8000, 0xd363b5f9 )
  425.     ROM_LOAD( "ts_13.rom",    0x20000, 0x8000, 0xa8f5a004 )
  426.     ROM_LOAD( "ts_18.rom",    0x28000, 0x8000, 0x3b36948c )
  427.     ROM_LOAD( "ts_23.rom",    0x30000, 0x8000, 0xbbfbe58a )
  428.     ROM_LOAD( "ts_24.rom",    0x38000, 0x8000, 0xf156e564 )
  429.  
  430.     ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  431.     ROM_LOAD( "tsu_10.rom",   0x00000, 0x8000, 0xf1180d02 )    /* Sprites */
  432.     ROM_LOAD( "tsu_09.rom",   0x08000, 0x8000, 0x6a049292 )
  433.     ROM_LOAD( "tsu_15.rom",   0x10000, 0x8000, 0xea912701 )
  434.     ROM_LOAD( "tsu_14.rom",   0x18000, 0x8000, 0x46b2ad83 )
  435.     ROM_LOAD( "tsu_20.rom",   0x20000, 0x8000, 0x17857ad2 )
  436.     ROM_LOAD( "tsu_19.rom",   0x28000, 0x8000, 0xb5c82722 )
  437.     ROM_LOAD( "tsu_22.rom",   0x30000, 0x8000, 0x5ee1ae6a )
  438.     ROM_LOAD( "tsu_21.rom",   0x38000, 0x8000, 0x98777006 )
  439. ROM_END
  440.  
  441. ROM_START( bionicc2 )
  442.     ROM_REGION( 0x40000, REGION_CPU1 )      /* 68000 code */
  443.     ROM_LOAD_EVEN( "02",      0x00000, 0x10000, 0xf2528f08 ) /* 68000 code */
  444.     ROM_LOAD_ODD ( "04",      0x00000, 0x10000, 0x38b1c7e4 ) /* 68000 code */
  445.     ROM_LOAD_EVEN( "03",      0x20000, 0x10000, 0x72c3b76f ) /* 68000 code */
  446.     ROM_LOAD_ODD ( "05",      0x20000, 0x10000, 0x70621f83 ) /* 68000 code */
  447.  
  448.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  449.     ROM_LOAD( "tsu_01b.rom",  0x00000, 0x8000, 0xa9a6cafa )
  450.  
  451.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  452.     ROM_LOAD( "tsu_08.rom",   0x00000, 0x8000, 0x9bf0b7a2 )    /* VIDEORAM (text layer) tiles */
  453.  
  454.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  455.     ROM_LOAD( "tsu_07.rom",   0x00000, 0x8000, 0x9469efa4 )    /* SCROLL2 Layer Tiles */
  456.     ROM_LOAD( "tsu_06.rom",   0x08000, 0x8000, 0x40bf0eb4 )
  457.  
  458.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  459.     ROM_LOAD( "ts_12.rom",    0x00000, 0x8000, 0xe4b4619e )    /* SCROLL1 Layer Tiles */
  460.     ROM_LOAD( "ts_11.rom",    0x08000, 0x8000, 0xab30237a )
  461.     ROM_LOAD( "ts_17.rom",    0x10000, 0x8000, 0xdeb657e4 )
  462.     ROM_LOAD( "ts_16.rom",    0x18000, 0x8000, 0xd363b5f9 )
  463.     ROM_LOAD( "ts_13.rom",    0x20000, 0x8000, 0xa8f5a004 )
  464.     ROM_LOAD( "ts_18.rom",    0x28000, 0x8000, 0x3b36948c )
  465.     ROM_LOAD( "ts_23.rom",    0x30000, 0x8000, 0xbbfbe58a )
  466.     ROM_LOAD( "ts_24.rom",    0x38000, 0x8000, 0xf156e564 )
  467.  
  468.     ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  469.     ROM_LOAD( "tsu_10.rom",   0x00000, 0x8000, 0xf1180d02 )    /* Sprites */
  470.     ROM_LOAD( "tsu_09.rom",   0x08000, 0x8000, 0x6a049292 )
  471.     ROM_LOAD( "tsu_15.rom",   0x10000, 0x8000, 0xea912701 )
  472.     ROM_LOAD( "tsu_14.rom",   0x18000, 0x8000, 0x46b2ad83 )
  473.     ROM_LOAD( "tsu_20.rom",   0x20000, 0x8000, 0x17857ad2 )
  474.     ROM_LOAD( "tsu_19.rom",   0x28000, 0x8000, 0xb5c82722 )
  475.     ROM_LOAD( "tsu_22.rom",   0x30000, 0x8000, 0x5ee1ae6a )
  476.     ROM_LOAD( "tsu_21.rom",   0x38000, 0x8000, 0x98777006 )
  477. ROM_END
  478.  
  479. ROM_START( topsecrt )
  480.     ROM_REGION( 0x40000, REGION_CPU1 )      /* 68000 code */
  481.     ROM_LOAD_EVEN( "ts_02.rom",  0x00000, 0x10000, 0xb2fe1ddb ) /* 68000 code */
  482.     ROM_LOAD_ODD ( "ts_04.rom",  0x00000, 0x10000, 0x427a003d ) /* 68000 code */
  483.     ROM_LOAD_EVEN( "ts_03.rom",  0x20000, 0x10000, 0x27f04bb6 ) /* 68000 code */
  484.     ROM_LOAD_ODD ( "ts_05.rom",  0x20000, 0x10000, 0xc01547b1 ) /* 68000 code */
  485.  
  486.     ROM_REGION( 0x10000, REGION_CPU2 ) /* 64k for the audio CPU */
  487.     ROM_LOAD( "ts_01.rom",    0x00000, 0x8000, 0x8ea07917 )
  488.  
  489.     ROM_REGION( 0x08000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  490.     ROM_LOAD( "ts_08.rom",    0x00000, 0x8000, 0x96ad379e )    /* VIDEORAM (text layer) tiles */
  491.  
  492.     ROM_REGION( 0x10000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  493.     ROM_LOAD( "ts_07.rom",    0x00000, 0x8000, 0x25cdf8b2 )    /* SCROLL2 Layer Tiles */
  494.     ROM_LOAD( "ts_06.rom",    0x08000, 0x8000, 0x314fb12d )
  495.  
  496.     ROM_REGION( 0x40000, REGION_GFX3 | REGIONFLAG_DISPOSE )
  497.     ROM_LOAD( "ts_12.rom",    0x00000, 0x8000, 0xe4b4619e )    /* SCROLL1 Layer Tiles */
  498.     ROM_LOAD( "ts_11.rom",    0x08000, 0x8000, 0xab30237a )
  499.     ROM_LOAD( "ts_17.rom",    0x10000, 0x8000, 0xdeb657e4 )
  500.     ROM_LOAD( "ts_16.rom",    0x18000, 0x8000, 0xd363b5f9 )
  501.     ROM_LOAD( "ts_13.rom",    0x20000, 0x8000, 0xa8f5a004 )
  502.     ROM_LOAD( "ts_18.rom",    0x28000, 0x8000, 0x3b36948c )
  503.     ROM_LOAD( "ts_23.rom",    0x30000, 0x8000, 0xbbfbe58a )
  504.     ROM_LOAD( "ts_24.rom",    0x38000, 0x8000, 0xf156e564 )
  505.  
  506.     ROM_REGION( 0x40000, REGION_GFX4 | REGIONFLAG_DISPOSE )
  507.     ROM_LOAD( "ts_10.rom",    0x00000, 0x8000, 0xc3587d05 )    /* Sprites */
  508.     ROM_LOAD( "ts_09.rom",    0x08000, 0x8000, 0x6b63eef2 )
  509.     ROM_LOAD( "ts_15.rom",    0x10000, 0x8000, 0xdb8cebb0 )
  510.     ROM_LOAD( "ts_14.rom",    0x18000, 0x8000, 0xe2e41abf )
  511.     ROM_LOAD( "ts_20.rom",    0x20000, 0x8000, 0xbfd1a695 )
  512.     ROM_LOAD( "ts_19.rom",    0x28000, 0x8000, 0x928b669e )
  513.     ROM_LOAD( "ts_22.rom",    0x30000, 0x8000, 0x3fe05d9a )
  514.     ROM_LOAD( "ts_21.rom",    0x38000, 0x8000, 0x27a9bb7c )
  515. ROM_END
  516.  
  517.  
  518.  
  519. GAME( 1987, bionicc,  0,       bionicc, bionicc, 0, ROT0, "Capcom", "Bionic Commando (US set 1)" )
  520. GAME( 1987, bionicc2, bionicc, bionicc, bionicc, 0, ROT0, "Capcom", "Bionic Commando (US set 2)" )
  521. GAME( 1987, topsecrt, bionicc, bionicc, bionicc, 0, ROT0, "Capcom", "Top Secret (Japan)" )
  522.